import React, {useState} from 'react';
import Child from "./components/Child";
import {Provider} from "./context";


function App() {
    const [state,setState] = useState({
        userName:"zhangsan",
        age:12
    });
    return (
        <Provider value={{
            state,
            setState
        }}>
            <h3>App</h3>
            <p>userName:{state.userName}</p>
            <p>age:{state.age}</p>
            <hr/>

                <Child/>


        </Provider>
    );
}

export default App;